package com.chenwut.stringDemo;

public class StringDemo6 {
    public static void main(String[] args) {
        String PhoneNumber = "18312346789";

        //截取手机号码前面三位
        String start = PhoneNumber.substring(0, 3);

        //截取手机号后四位
        String end = PhoneNumber.substring(7);

        //拼接
        String result = start + "****" + end;

        System.out.println(result);
    }
}
